<template>
  <div class="my_header">
    <span>
      <slot name="left"></slot>
    </span>
    <section>
      <!-- <slot name="center" :i="num"></slot>作用域插槽 --> 
      <slot name="center"></slot>
    </section>
    <span>
      <slot name="right"></slot>
    </span>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
export default {
  setup() {
    const num = ref(10)
    return {
        num
    }
  },
};
</script>
<style lang="scss" scoped>
.my_header {
  height: 50px;
  display: flex;
  background: #fff;
  font-size: 15px;
  align-items: center;
  span {
    width: 60px;
    text-align: center;
  }
  section {
    flex: 1;
    text-align: center;
  }
}
</style>